﻿ 
 

 module WorkBasket {
    export module SOC {
        var wfr: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Workflow>;
        var fdr: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Field>;
        var Stp: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Step>;
        var PVer: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.ProcessVersion>;
        var Frm: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form>;
        var FrmCtl: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.FormControl>;
        var Inst: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Instance>;
        var InstHist: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.InstanceHistory>;
        var Grp: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Group>;
        var Unt: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Unit>;
        var GrpMem: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Groupmember>;
        var GrpProp: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.GroupProperty>;
        var DomUnt: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.DomainUnit>;
        var Inv: WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Invite>;


        export function Invites()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Invite> {
            if (Inv === undefined) {
                Inv = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Invite>("Invite");
            };

            return Inv;

        }



        export function DomainUnits()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.DomainUnit> {
            if (DomUnt === undefined) {
                DomUnt = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.DomainUnit>("DomainUnit");
            };

            return DomUnt;

        }


        export function GroupPropertys()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.GroupProperty> {
            if (GrpProp === undefined) {
                GrpProp = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.GroupProperty>("GroupProperty");
            };

            return GrpProp;

        }
        export function Workflows()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Workflow> {
            if (wfr === undefined)
            {
                wfr = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Workflow>("Workflow");
            };

            return wfr;

        }
        export function Fields()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Field> {
            if (fdr === undefined) {
                fdr = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Field>("Field");
            };

            return fdr;
        }
        export function Steps()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Step> {
            if (Stp === undefined) {
                Stp = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Step>("Step");
            }
            return Stp;

        }
        export function ProcessVersions()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.ProcessVersion> {
                if (PVer === undefined) {
                    PVer = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.ProcessVersion>("ProcessVersion");
                }
                return PVer;
        }

        export function Forms()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form> {
            if (Frm === undefined) {
                Frm = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form>("Form");
            }
            return Frm;
        }
        export function FormControls()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form> {
            if (FrmCtl === undefined) {
                FrmCtl = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form>("FormControl");
            }
            return FrmCtl;
        }
        export function Instances()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Instance> {
            if (Inst === undefined) {
                Inst = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form>("Instance");
            }
            return Inst;
        }
        export function InstanceHistorys()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.InstanceHistory> {
            if (InstHist === undefined) {
                InstHist = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form>("InstanceHistory");
            }
            return InstHist;
        }
        export function Units()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Unit> {
            if (Unt === undefined) {
                Unt = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form>("Unit");
            }
            return Unt;
        }
        export function Groups()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Group> {
            if (Grp === undefined) {
                Grp = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form>("Group");
            }
            return Grp;
        }
        export function GroupMembers()
            : WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Groupmember> {
            if (GrpMem === undefined) {
                GrpMem = new WorkBasket.Repositories.RepositoryBase<WorkBasket.Entities.Form>("GroupMember");
            }
            return GrpMem;
        }

        
    }


    }

